import React, { useEffect } from 'react';
import { useNavigate, useParams, useSearchParams } from 'react-router-dom';
import { Button, Typography } from 'antd';
const { Title, Paragraph } = Typography;
import styles from './Home.module.scss';
import axios from 'axios';
export default function Home() {
    const navigate = useNavigate();
    useEffect(() => {
        // console.log('home');
        axios.get('/api/test').then(res => {
            console.log(res.data);
        });
    }, []);

    const handleOpen = () => {
        navigate('/manage/list');
    };
    return (
        <div className={styles.homeContainer}>
            <Title>问卷调查 | 在线投票</Title>
            <Paragraph>
                已累计创建问卷1009份，发布问卷100份，收到答卷88份
            </Paragraph>
            <Button type="primary" onClick={handleOpen}>
                开始使用
            </Button>
        </div>
    );
}
